from selenium.webdriver.common.by import By

from page_objects.common_page import CommonPage
from page_objects.media_details_page import MediaDetailsPage


class RecommendPage(CommonPage):
    media_loc = (By.CSS_SELECTOR, '[title="3.5M视频.mp4_240_H264"]')

    def click_media(self):
        self.click(*self.media_loc)
        return MediaDetailsPage(self.driver)
